﻿<div class="modal fade" ng-controller="CustomerDetailCtrl" ng-class="{'in':$visible}" ng-show="$visible" style="display:block;">
    <div class="modal-dialog modal-lg" ng-style="{'width':dialogWidth}">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" ng-click="$close()"><span>×</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title" ng-bind="$title"></h4>
            </div>
            <!--内容区域开始-->
            <div class="modal-body" style="overflow:auto;" ng-style="{'height':$height}">
                <ul class="nav nav-tabs">
                    <li ng-click="TabIndex=1" ng-class="{'active':!TabIndex||TabIndex==1}"><a href="JavaScript:;" aria-controls="CustomerInfo">客户资料</a></li>
                    <li ng-click="TabIndex=2;" ng-class="{'active':TabIndex==2}"><a href="JavaScript:;" aria-controls="CustomerContact">联系人</a></li>
                    <li ng-click="TabIndex=3" ng-class="{'active':TabIndex==3}"><a href="JavaScript:;" aria-controls="CustomerCar">名下车辆</a></li>
                    <li ng-click="TabIndex=4" ng-class="{'active':TabIndex==4}"><a href="JavaScript:;" aria-controls="CustomerCarRepire">车辆维修</a></li>
                    <li ng-click="TabIndex=5" ng-class="{'active':TabIndex==5}"><a href="JavaScript:;" aria-controls="CustomerCarRepire">车辆保险</a></li>
                    <li ng-click="TabIndex=6" ng-class="{'active':TabIndex==6}"><a href="JavaScript:;" aria-controls="CustomerCarRepire">车辆检测</a></li>
                    <li ng-click="TabIndex=7" ng-class="{'active':TabIndex==7}"><a href="JavaScript:;" aria-controls="CustomerCarRepire">租车</a></li>
                    <!--<li ng-click="TabIndex=8;MapTabClick();" ng-class="{'active':TabIndex==8}"><a href="JavaScript:;" aria-controls="CustomerCarRepire">车辆轨迹</a></li>-->
                </ul>
                <div class="tab-content" style="margin-top:10px;">
                    <div class="tab-pane" ng-class="{'active':!TabIndex||TabIndex==1}">
                        <table class="table table-striped table-bordered table-detail">
                            <tr>
                                <th>标签</th>
                                <td>  
                                    <img ng-show="$parent.CustomerDialog_CustomerDetail.IsAppUser" src="Images/app_logo.png" title="车享南京App用户" style="width:30px;margin:0px 5px;border-radius:8px;box-shadow:2px 2px 5px rgba(0,0,0,.3);" />
                                    <span class="label label-info">常洗车</span>
                                    <span class="label label-warning">常保养</span>
                                    <span class="label label-danger">常修车</span>
                                <td>
                                    <span style="color:#ddd;">
                                        ---------------
                                    </span>
                                </td>
                            </tr>
                            <tr ng-repeat="item in CustomerDetailColumns">
                                <th>{{item.ColumnText}}</th>
                                <td>{{$parent.CustomerDialog_CustomerDetail[item.ColumnName]}}</td>
                                <td style="width:100px;">
                                    <span ng-show="item.SystemFlag" style="color:#ddd;">
                                        ---------------
                                    </span>
                                    <span ng-show="!item.SystemFlag && $parent.CustomerDialog_CustomerDetail[item.ColumnName+'_History'].length==0" style="color:#ddd;">
                                        无变更记录
                                    </span>
                                    <a ng-show="$parent.CustomerDialog_CustomerDetail[item.ColumnName+'_History'].length!=0"
                                       ng-click="$parent.Dialog_CustomerDetailHistory($parent.CustomerDialog_CustomerDetail,item.ColumnText,item.ColumnName)">
                                        <span>{{$parent.CustomerDialog_CustomerDetail[item.ColumnName+'_History'].length}}</span>次变更记录
                                    </a>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="tab-pane" ng-class="{'active':TabIndex==2}">
                        <div class="alert alert-warning" ng-show="ContactList.length==0">
                            <strong>提示：</strong> 该客户暂无联系人信息.....
                        </div>
                        <table class="table table-striped table-bordered" ng-show="ContactList.length!=0">
                            <thead class="thead">
                                <tr>
                                    <th>序号</th>
                                    <th>姓名</th>
                                    <th>手机号</th>
                                    <th>性别</th>
                                    <th>关系</th>
                                    <th>QQ</th>
                                    <th>微信</th>
                                    <th>地址</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng-repeat="item in ContactList">
                                    <td ng-bind="$index+1"></td>
                                    <td ng-bind="item.ContactName"></td>
                                    <td ng-bind="item.Mobile"></td>
                                    <td ng-bind="item.Gender"></td>
                                    <td ng-bind="item.Relation"></td>
                                    <td ng-bind="item.QQ"></td>
                                    <td ng-bind="item.WeChat"></td>
                                    <td ng-bind="item.Address"></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="tab-pane" ng-class="{'active':TabIndex==3}">
                        <div class="alert alert-info" ng-show="Detail_Customer_CarList.length==0">
                            <strong>提示：</strong> 该客户暂无车辆信息.....
                        </div>
                        <table class="table table-striped table-bordered" ng-show="Detail_Customer_CarList.length!=0">
                            <thead class="thead">
                                <tr>
                                    <th>序号</th>
                                    <th>车牌号</th>
                                    <th>车架号/VIN</th>
                                    <th>车品牌</th>
                                    <th>车系</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng-repeat="item in Detail_Customer_CarList">
                                    <td ng-bind="$index+1"></td>
                                    <td><a ng-bind="item.CarNo" ng-click="Dialog_CarInfo(item)"></a></td>
                                    <td><a ng-bind="item.VIN" ng-click="Dialog_CarInfo(item)"></a></td>
                                    <td ng-bind="item.CarBrand" style="color:green;font-weight:bold;"></td>
                                    <td ng-bind="item.CarSeries" style="color:green;font-weight:bold;"></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="tab-pane" ng-class="{'active':TabIndex==4}">
                        <div class="alert alert-warning" ng-show="RepireList.length==0">
                            <strong>提示：</strong> 该客户暂无车辆维修信息.....
                        </div>
                        <table class="table table-striped table-bordered" ng-show="RepireList.length!=0">
                            <thead class="thead">
                                <tr>
                                    <th>序号</th>
                                    <th>描述</th>
                                    <th>时间</th>
                                    <th>消费金额</th>
                                    <th>部门</th>
                                    <th>系统</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng-repeat="item in RepireList">
                                    <td ng-bind="$index+1"></td>
                                    <td><span ng-bind="item.BusinessDesc" title="{{item.Comment}}"></span></td>
                                    <td ng-bind="item.BusinessTime"></td>
                                    <td ng-bind="item.Cost"></td>
                                    <td ng-bind="$parent.Base_DepartmentDic[item.Department].SmallName"></td>
                                    <td ng-bind="$parent.Base_SystemDic[item.DHSystem].SmallName"></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="tab-pane" ng-class="{'active':TabIndex==5}">
                        <div class="alert alert-warning" ng-show="InsuranceList.length==0">
                            <strong>提示：</strong> 该客户暂无车辆保险信息.....
                        </div>
                        <table class="table table-striped table-bordered" ng-show="InsuranceList.length!=0">
                            <thead class="thead">
                                <tr>
                                    <th>序号</th>
                                    <th>描述</th>
                                    <th>时间</th>
                                    <th>消费金额</th>
                                    <th>部门</th>
                                    <th>系统</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng-repeat="item in InsuranceList">
                                    <td ng-bind="$index+1"></td>
                                    <td><a ng-bind="item.BusinessDesc" title="{{item.Comment}}"></a></td>
                                    <td ng-bind="item.BusinessTime"></td>
                                    <td ng-bind="item.Cost"></td>
                                    <td ng-bind="item.Department"></td>
                                    <td ng-bind="item.DHSystem"></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="tab-pane" ng-class="{'active':TabIndex==6}">
                        <div class="alert alert-warning" ng-show="InspectionList.length==0">
                            <strong>提示：</strong> 该客户暂无车辆检测信息.....
                        </div>
                        <table class="table table-striped table-bordered" ng-show="InspectionList.length!=0">
                            <thead class="thead">
                                <tr>
                                    <th>序号</th>
                                    <th>描述</th>
                                    <th>时间</th>
                                    <th>消费金额</th>
                                    <th>部门</th>
                                    <th>系统</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng-repeat="item in RepireList">
                                    <td ng-bind="$index+1"></td>
                                    <td><a ng-bind="item.BusinessDesc" title="{{item.Comment}}"></a></td>
                                    <td ng-bind="item.BusinessTime"></td>
                                    <td ng-bind="item.Cost"></td>
                                    <td ng-bind="item.Department"></td>
                                    <td ng-bind="item.DHSystem"></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="tab-pane" ng-class="{'active':TabIndex==7}">
                        <div class="alert alert-warning" ng-show="SaleList.length==0">
                            <strong>提示：</strong> 该客户暂无代步车租赁信息.....
                        </div>
                        <table class="table table-striped table-bordered" ng-show="SaleList.length!=0">
                            <thead class="thead">
                                <tr>
                                    <th>序号</th>
                                    <th>描述</th>
                                    <th>时间</th>
                                    <th>消费金额</th>
                                    <th>部门</th>
                                    <th>系统</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng-repeat="item in RepireList">
                                    <td ng-bind="$index+1"></td>
                                    <td><a ng-bind="item.BusinessDesc" title="{{item.Comment}}"></a></td>
                                    <td ng-bind="item.BusinessTime"></td>
                                    <td ng-bind="item.Cost"></td>
                                    <td ng-bind="item.Department"></td>
                                    <td ng-bind="item.DHSystem"></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="tab-pane" ng-class="{'active':TabIndex==8}">
                        <div ng-style="{'height':mapHeight}">
                            <lmap id="mapid" delayinit="true" option="mapOption" event="mapEvent"></lmap>
                        </div>
                        <!---->
                    </div>
                </div>
            </div>

            <div class="modal-footer">
                <button type="button" class="btn btn-default" ng-click="$close()">关闭</button>
            </div>
            <!--内容区域结束-->
        </div>
    </div>
</div>